- var formatNumber = function (v) { return (v < 100 ? v : '99+') + ' '; };

.sidebar-filter
  .sidebar-filter-status.btn-group.btn-group-justified
    a.btn.btn-default(data-status='open', class=(filter.status === 'open' ? 'active' : ''))
      = formatNumber(openCount) + t('sidebar.open')
    a.btn.btn-default(data-status='closed', class=(filter.status === 'closed' ? 'active' : ''))
      = formatNumber(closedCount) + t('sidebar.closed')

  .sidebar-filter-sort.btn-group
    button.btn.btn-default.current-department(type='button', data-sort-btn)
      span.pull-left= t(currentSort.label)
      span.caret
    ul.dropdown-list
      each sort, name in sorts
        - var active = name == currentSort.name
        li(data-sort=name, class= active ? 'active' : '')
          a(href='#')= t(sort.label)

  .sidebar-filter-hide-voted(class=user.logged() ? '' : 'hide')
    input#hide-voted(type='checkbox',
      name='hide-voted',
      checked= filter.hideVoted,
      data-hide-voted)
    label(for='hide-voted')= t('sidebar.hide-voted')
